package redis

import (
	"github.com/go-redis/redis/v8"
	"zy31/rpc/appconfig"
)

var (
	Client *redis.Client
)

func RedisInit() {
	appConfig := appconfig.AppConfig.Redis
	Client = redis.NewClient(&redis.Options{
		Addr:     appConfig.Addr,
		Password: appConfig.Password, // no password set
		DB:       appConfig.DB,       // use default DB
	})
}
